package WinterVacation.Day1;

import java.util.Scanner;

public class day1 {
//    public static void main(String[] args) {
//        System.out.println("请输入一个要转换的字母:");
//        Scanner letter = new Scanner(System.in);
//        char letters = letter.next().charAt(0);
//        if(letters >= 'a' && letters <= 'z'){
//            System.out.println("您输入的是小写字母");
//            letters = (char)(letters - 32);
//            System.out.println("转换后的大写字母为" + letters);
//        }else{
//            System.out.println("您输入的不是小写字母");
//        }
//    }
public static void isDays(int year,int month,int day) {
    int days=0;
    switch(month){
        case 12:days+=30;//这里不要加break
        case 11:days+=31;
        case 10:days+=30;
        case 9:days+=31;
        case 8:days+=31;
        case 7:days+=30;
        case 6:days+=31;
        case 5:days+=30;
        case 4:days+=31;
        case 3:
            if((year%4==0&&year%100!=0)||(year%400==0)){
                days+=29;
            }else{
                days+=28;
            }
        case 2:days+=31;
        case 1:days+=day;//1月15号，不能算整个1月
    }
    System.out.print("第" + days + "天");
}
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        System.out.print("请输入年:");
        int year=sc.nextInt();
        System.out.print("请输入月:");
        int month=sc.nextInt();
        System.out.print("请输入日:");
        int day=sc.nextInt();
        isDays(year,month,day);
    }
}
